(display "\n========================================\n")
(define seqs (list (list 1 2 3) (list 4 5 6) (list 7 8 9) (list 10 11 12) (list 10 1 1)))
(display seqs)
(newline)

(define (accumulate op initial sequence)
    (if (null? sequence)
        initial
        (op (car sequence)
            (accumulate op initial (cdr sequence)))))

(define (car-n s)
    (map car s))
; (display (car-n seqs))
; (newline)

(define (cdr-n s)
    (map cdr s))
; (display (cdr-n seqs))
; (newline)

(define (accumulate-n op init seqs)
    (if (null? (car seqs))
        '()
        (cons (accumulate op init (car-n seqs))
              (accumulate-n op init (cdr-n seqs)))))

(display (accumulate-n + 0 seqs))
(display "\n========================================\n")
